<#assign module="driver"/>

<@override name="header">
    <link rel="stylesheet" href="${ctx}/assets/css/datepicker/datepicker.css">
    <link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
    <style>
        .table > thead > tr > th {
            text-align: center;
        }

        .table > tbody > tr > th {
            text-align: center;
        }

        .table > tbody > tr > td {
            vertical-align: middle;
            text-align: center;
        }
    </style>
</@override>
<@override name="body">
    <div class="tabbable tabs-left">
        <div class="row">
            <div class="col-xs-12 col-md-10">
                <div class="orders-navt">
                    <ul class="orders-nav">
                        <@shiro.hasPermission name='servicePersonal'>
                            <li style="width:90px;"><a href="${ctx}/driver/list">服务人员</a></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='drivergrade'>
                            <li style="width:110px;"><a href="${ctx}/drivergrade/list">服务人员等级</a></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='driverapply'>
                            <li class="orders-click"><a href="${ctx}/driverapply/list" class="orders-click-a">申请</a>
                            </li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='callLog'>
                            <li style="width:90px;"><a href="${ctx}/driver/recordlist">通话记录</a></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='notice'>
                            <li><a href="${ctx}/notice/list">通知</a></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='announcement'>
                            <li style="width:90px;"><a href="${ctx}/driver/announcementList">公告</a></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='drivermoney'>
                            <li style="width:90px;"><a href="${ctx}/driver/drivermoney">批量操作</a></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='drivermoney'>
                            <li style="width:110px;"><a href="${ctx}/driver/driverReward">服务人员奖励</a></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='driverenchashment'>
                            <li style="width:100px;"><a href="${ctx}/driverenchashment/list">申请提现</a></li>
                            <li style="width:120px;"><a href="${ctx}/driverRebateenchashment/extendList">申请提取推广奖励</a></li>
                        </@shiro.hasPermission>
                        <@shiro.hasPermission name='driverloginrecord'>
                            <li style="width:90px;"><a href="${ctx}/driver/loginlist">登录日志</a></li>
                        </@shiro.hasPermission>
                    </ul>
                </div>
            </div>
            <@shiro.hasPermission name='driveradd'>
                <div class="col-xs-12 col-md-2" style=" padding: 0px 20px 15px 5px;">
                    <button class="pull-right buttoncss" onclick="window.location='${ctx}/driver/add';"><b>+</b>&nbsp;新增服务人员
                    </button>
                </div>
            </@shiro.hasPermission>
            <div class="col-xs-1">
            </div>
        </div>
    </div>

    <div class="row margin-top">
        <div class="col-xs-12">

            <div class="tabta-content">
                <table class="table table-condensed table-striped ">
                    <tbody>
                    <tr>
                        <th>操作</th>
                        <th>真实姓名</th>
                        <th>手机号</th>
                        <th>介绍人</th>
                        <th>申请时间</th>
                        <th>操作</th>
                    </tr>
                    </tbody>
                </table>

                <ul class="pagination pull-left pagination-sm pageshow" id="pageshow" style="display:none;">
                    <li><a></a></li>
                </ul>
                <ul class="pagination pull-left pagination-sm pagedata" id="pagedata" style="display:none;">
                </ul>
            </div>

        </div>
    </div>
</@override>

<@override name="footer">
    <script type="text/javascript">
        window.daijia = {
            ctx: '${ctx}',
            userId: '<@shiro.principal property='id'/>'
        };
    </script>
    <script src="${ctx}/assets/js/jquery.paging.min.js"></script>
    <script src="${ctx}/assets/js/pushmessage.js"></script>
    <script src="${ctx}/assets/js/datepicker.js"></script>
    <script src="${ctx}/assets/js/driver/driverApplyList.js"></script>
    <script type="text/javascript">
        var thisButton;

        function deleteDriverApply() {
            $.post('${ctx}/driverapply/delete', {'id': thisButton.attr("data-value")}, function (data) {
                if (data.success) {
                    thisButton.parent().parent().remove();
                    $.scojs_message('服务人员申请删除成功', $.scojs_message.TYPE_OK);
                    setTimeout("window.location.reload(true)", 800);
                } else {
                    $.scojs_message(data.message, $.scojs_message.TYPE_ERROR);
                }
            }, 'json');
        }

        $(document).ready(function () {
            $(document).on("click", ".deletethis", function () {
                thisButton = $(this);
                var confirm = $.scojs_confirm({
                    content: "确定要删除该申请吗？",
                    action: deleteDriverApply
                });
                confirm.show();
            });
        });
    </script>
</@override>
<@extends name="../layout.ftl"/>